<html>
	<head>
		<title>Scroll Keyword Testbed</title>
	</head>
    <style>
        .table {
            width: 250px;
             max-height:50px;
             overflow: scroll
        }
        .option {
            height:24px;
             border-bottom: 1px solid black;
        }
    </style>
	<body>
		<div class="table" onscroll="setText">
            <div class="option">Div 1</div>
            <div class="option">Div 2</div>
            <div class="option">Div 3</div>
            <div class="option">Div 4</div>
            <div class="option">Div 5</div>
            <div class="option">Div 6</div>
            <div class="option">Div 7</div>
            <div id="target" class="option">Div 8</div>
        </div>
        <div id="result">

        </div>
		<script type="text/javascript">
		document.querySelector(".table").onscroll = function() {myFunction()};
        function myFunction() {
             document.querySelector("#result").innerHTML = "You scrolled in div.";
        }
		</script>
	</body>
</html>